Frontend Forever App
We have a mobile app for you to download and use. And you can unlock many features in the app.
Get it now
Intall Later
Run
HTML
CSS
Javascript
Output
Document
.cont .cube .side .side .side .side .side .side
@charset "UTF-8"; @import url(https://fonts.googleapis.com/css?family=Nunito+Sans:300,400,600,700,800); *, :after, :before { box-sizing: border-box; padding: 0; margin: 0; } @property --hue { syntax: "
"; initial-value: 0deg; inherits: false; } div { transform-style: preserve-3d; box-sizing: border-box; } .cont { --clr: hsl(var(--hue) 80% 80%); --hue2: calc(var(--hue) + 90deg); --clr2: hsl(var(--hue2) 80% 80%); color: var(--clr); filter: drop-shadow(0 0 1.5vmin currentcolor); animation: clr-chg infinite 10s linear; } .cube { width: 40vmin; aspect-ratio: 1; position: relative; rotate: 1 1 1 45deg; animation: rot infinite 20s linear; &:hover { animation-play-state: paused; .side { --clr2: color-mix(in lab, var(--clr), #fff); box-shadow: 0 0 2vmin currentcolor; } } } .side { --ang: 45deg; position: absolute; inset: 0; font-size: 3rem; //border: 1px solid; background-image: repeating-linear-gradient( var(--ang), #0000 0 9%, var(--clr) 0 14%, #0000 0 23%, var(--clr2) 0 27%, #0000 0 ); } .side:nth-of-type(1){ translate: 0 0 20vmin; } .side:nth-of-type(2){ rotate: y 90deg; translate: 20vmin; transform: rotatez(270deg); } .side:nth-of-type(3){ rotate: y 90deg; translate: -20vmin; //--ang: 135deg; transform: rotatez(90deg); } .side:nth-of-type(4){ rotate: x 90deg; translate: 0 20vmin; transform: rotatez(270deg); } .side:nth-of-type(5){ rotate: x 90deg; translate: 0 -20vmin; --ang: 135deg; } .side:nth-of-type(6){ translate: 0 0 -20vmin; transform: rotatez(180deg); } @keyframes rot { to { transform: rotatex(1080deg) rotatey(360deg) rotatez(720deg) } } @keyframes clr-chg { from { --hue: 0deg; } to { --hue: 360deg; } } body { display: grid; place-content: center; min-height: 100vh; margin: 0; background: radial-gradient( at 100% 20%, #5EB0E525, #0000 70% ), radial-gradient( at 20% 20%, #F3D06025, #0000 70% ), radial-gradient( at 20% 100%, #A5282C25, #0000 70% ), radial-gradient( at 100% 100%, #AEE1CD25, #0000 70% ), #1f2020; background-blend-mode: color-dodge; }
console.log("Event Fired")